package com.panghu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panghu.entity.Admin;
import com.panghu.entity.Login;
import com.panghu.entity.Student;
import com.panghu.entity.Teacher;
import com.panghu.mapper.AdminMapper;
import com.panghu.mapper.LoginMapper;
import com.panghu.service.AdminService;
import com.panghu.service.LoginService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class LoginServiceImpl extends ServiceImpl<LoginMapper,Login> implements LoginService {

    @Resource
    private LoginMapper loginMapper;

    @Override
    public Admin adminLogin(Integer username, String password) {
        return loginMapper.adminLogin(username,password);
    }

    @Override
    public Teacher teacherLogin(Integer username, String password) {
        return loginMapper.teacherLogin(username,password);
    }

    @Override
    public Student studentLogin(Integer username, String password) {
        return loginMapper.studentLogin(username,password);
    }
}
